# -*- coding: utf-8 -*-

import django
from django.conf.urls import include, url
from rest_framework import routers

from tests.mockapp.views import (SearchPersonFacetViewSet,
                                 SearchPersonMLTViewSet)

router = routers.DefaultRouter()

if django.VERSION[:2] < (3, 0):
    router.register("search-person-mlt",
                    viewset=SearchPersonMLTViewSet,
                    base_name="search-person-mlt")
    router.register("search-person-facet",
                    viewset=SearchPersonFacetViewSet,
                    base_name="search-person-facet")
else:
    router.register("search-person-mlt",
                    viewset=SearchPersonMLTViewSet,
                    basename="search-person-mlt")
    router.register("search-person-facet",
                    viewset=SearchPersonFacetViewSet,
                    basename="search-person-facet")

urlpatterns = [url(r"^", include(router.urls))]
